package com.husong.java.beans;

/**
 * Created by husong on 2017/3/15.
 */
public class ReflectTestBean {
    public static int staticint = 1;
    public int inta;
    public String str1;

    private int intb;
    private String[] str2;

    public ReflectTestBean() {
        System.out.println("调用默认的构造方法！");
    }

    public ReflectTestBean(int inta) {
        this.inta = inta;
        System.out.println("调用1个int参数的构造方法！");
    }

    public ReflectTestBean(int inta, String str1, int intb, String[] str2) {
        this.inta = inta;
        this.str1 = str1;
        this.intb = intb;
        this.str2 = str2;
        System.out.println("调用4个参数的构造方法！");
    }

    private ReflectTestBean(int inta, int intb) {
        this.inta = inta;
        this.intb = intb;
        System.out.println("调用2个参数的private构造方法！");
    }

    public int getInta() {
        return inta;
    }

    public void setInta(int inta) {
        this.inta = inta;
    }

    public String getStr1() {
        return str1;
    }

    public void setStr1(String str1) {
        this.str1 = str1;
    }

    public int getIntb() {
        return intb;
    }

    public void setIntb(int intb) {
        this.intb = intb;
    }

    public String[] getStr2() {
        return str2;
    }

    public void setStr2(String[] str2) {
        this.str2 = str2;
    }

    private void privateFunction(){
        System.out.println("private方法！");
    }

    @Override
    public String toString() {
        return "ReflectTestBean{" +
                "inta=" + inta +
                ", str1='" + str1 + '\'' +
                ", intb=" + intb +
                ", str2='" + str2 + '\'' +
                '}';
    }
}
